home *** CD-ROM | disk | FTP | other *** search
/ Revista CD Expert 37 / CD Expert nº 37.iso / LastCall / lastcall.exe / stuff / lastcall.dxr / 00119_Begin Bonus Mode (shot or earned).ls < prev    next >
Encoding:
Text File  |  2000-03-27  |  1.3 KB  |  44 lines

  1. on exitFrame
  2.   global gSoundTrack, gGameLevel, gPauseTime
  3.   resetCursor()
  4.   playBonusSound(1, "BRA_X08")
  5.   gSoundTrack = getAt(["BRM_A02", "BRM_A01"], (gGameLevel mod 2) + 1)
  6.   playTrack()
  7.   gPauseTime = 0
  8. end
  9.  
  10. on beginSprite
  11.   global debug, gBonusLimit, gFastPlay, gPlayerTipsThisLevel, gRecipeWindowOpenTime, gGameLevel, gRetrievedGame, gBonusStartTime, gLeftOverTime
  12.   if not gRetrievedGame then
  13.     gPlayerTipsThisLevel = 0
  14.   end if
  15.   gBonusLimit = seconds(currentLevel(#BONUSTIMELIMIT))
  16.   closeRecipeWindow()
  17.   if debug then
  18.     put "Time recipe window was open" && gRecipeWindowOpenTime && seconds(gRecipeWindowOpenTime)
  19.   end if
  20.   if gLeftOverTime > 0 then
  21.     extraTime = min(30, 5 * ticksToMinutes(gLeftOverTime))
  22.     if debug then
  23.       put "Earned an extra" && extraTime && " seconds in Bonus Round"
  24.     end if
  25.     gBonusLimit = gBonusLimit + seconds(extraTime)
  26.   end if
  27.   if (gGameLevel > 1) or authoring() then
  28.     lostTime = min(30, 5 * ticksToMinutes(gRecipeWindowOpenTime))
  29.     if debug then
  30.       put "Lost" && lostTime && "seconds in Bonus Round for too much recipe window use"
  31.     end if
  32.     gBonusLimit = gBonusLimit + seconds(lostTime)
  33.   end if
  34.   if gFastPlay then
  35.     gBonusLimit = gBonusLimit / 2
  36.   end if
  37.   if gRetrievedGame then
  38.     restartBonusRound()
  39.     gRetrievedGame = 0
  40.   else
  41.     gBonusStartTime = now()
  42.   end if
  43. end
  44.